Field of the Invention
The present invention relates to an encoder which outputs a measurement value of a position or angle of a scale and a method of outputting a measurement value of a position or angle.
Description of the Related Art
Industrial apparatuses, processing machines, and measurement apparatuses use encoders for measuring a position or angle. Known examples of linear encoders which measure a position are incremental linear encoders which measure a relative position, and absolute linear encoders which measure an absolute position. Known examples of rotary encoders which measure an angle are incremental rotary encoders which measure a relative angle, and absolute rotary encoders which measure an absolute angle.
An optical encoder irradiates a scale with light from a light source and receives, by a photoelectric conversion element, transmitted light or reflected light which passes through the scale. For example, the light source and photoelectric conversion element are attached to a moving or rotating target object, and the scale is attached to the stationary side serving as the reference. In some cases, the scale is attached to a target object, and the light source and photoelectric conversion element are attached to the stationary side.
In an incremental encoder, the marks of a transmission film or reflection film are formed on the scale at equal intervals. The received light intensity of the transmitted or reflected light having passed through the marks represent a sine wave of a predetermined cycle. A signal processor counts the wave number of a detected sine wave signal and divides the phase in the cycle, improving the measurement resolution. The signal processor combines the wave number count value and phase information to output high-resolution position information.
In an absolute encoder, the marks of a transmission film or reflection film correspond to pseudorandom number codes formed on the scale. The absolute encoder detects light signals (light intensity distribution) corresponding to the pseudorandom number codes. Based on the reference table of the pseudorandom number code and the absolute position or absolute angle, a signal processor obtains an absolute position or absolute angle corresponding to the detected pseudorandom number codes. Similar to the incremental encoder, the signal processor obtains the phases of light signals corresponding to the pseudorandom number codes, outputting high-resolution absolute position information.
In general, measurement data of the position or angle by these encoders are transmitted to a host system in response to a measurement data request signal from the host system. The host system performs positioning control necessary for an industrial apparatus or processing machine based on the measurement data of these encoders, or collects measurement data of the position or angle as a measurement apparatus.
When a target object is moving, a measurement error is generated owing to the delay time between the time of a measurement data request from the host system and the time of actual measurement in the encoder. That is, a measurement error is generated by the product of the moving velocity and delay time. Japanese Patent Laid-Open Nos. 8-261794 and 2007-71865 disclose techniques for correcting a measurement error in an encoder. In the technique described in Japanese Patent Laid-Open No. 8-261794, the moving amount (change of the position) of a target object upon the delay time taken to output position data is predicted using currently obtained position data and previously obtained position data, and then the currently obtained position data is corrected. In the technique described in Japanese Patent Laid-Open No. 2007-71865, the time till a data request after sampling by A/D conversion is measured in response to an external data request, and position data before and after the data request are interpolated to output the position data.
An industrial apparatus, processing machine, or measurement apparatus requires higher-accuracy measurement of the position or angle. On the other hand, the moving velocity or rotational velocity of a target object is becoming higher. This increases a measurement error arising from the movement of the target object and a measurement delay in the encoder. More accurate correction is required for a higher moving velocity of the target object.
The encoder described in Japanese Patent Laid-Open No. 8-261794 starts measurement in response to a measurement data request signal from a host system, corrects a position error arising from the delay time, and outputs position data. When high-speed measurement is performed, that is, the cycle of a measurement request from the host system is shorter than the sum of the measurement time, signal processing time, and position data output time, the next measurement is requested before output of position data obtained by preceding measurement. Hence, the position error arising from the delay time cannot be corrected.
The encoder described in Japanese Patent Laid-Open No. 2007-71865 measures the time till a data request after sampling by A/D conversion in response to an external data request, and interpolates position data before and after the data request, outputting the position data. In this case, the sampling cycle of A/D conversion needs to be longer than the sum of the A/D conversion time and subsequent signal processing time. To interpolate position data, position data before and after a data request are necessary. When high-speed measurement is performed, that is, the cycle of a measurement request from the host system is shorter than the sum of the A/D conversion time, signal processing time, and position data output time, it is impossible to interpolate position data before and after a measurement request and output the position data. As a result, no accurate position can be output.